import java.util.Arrays;

public class Text {
    public static void main(String[] args) {
        int[] array={2,2,1,1,1,2,2};
        int ret=func(array);
        System.out.println(array[ret]);
    }
    public static int func(int[] array){
        Arrays.sort(array);
        return array.length/2;
    }
}
